home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 16
/
64er_Magazin_Sonderheft_16_19xx_Markt__Technik_de_Side_B.d64
/
habu 64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
33KB
|
1,297 lines
1 poke1,55:goto100
6 sys51150,fy(i),fx(i)
7 return
8 remsyssa,22,0,1,">>>>[160]buchung[160]eingeben[160]bzw.[160]aendern[160]<<<<<";
9 remprint">>>>>>>[160](ende[160]mit[160][160]shift[160]return)[160]<<<<<<<";
10 return
11 rem felddruck
12 fori=1tofa
13 :syssa,fy(i),fx(i),0,f$(i)
15 :nexti
16 gosub54000:gosub54110
17 return
18 rem-eingabemenue
19 y%=0:z=1:bh$=" ":ah$=chr$(32)
20 syss9,fy(i),fx(i)+z-1
21 syss3,ah$,y%:rem editor
22 ony%goto24,27,27,29,32,35,35,37,39,41,44,34,48,49,49,48,46,49,49,46
23 rem-klein
24 ifz>fl(i)thensyssa,fy(i),fx(i),0,f$(i):i=i+1:return
25 :syss4,ah$,bh$,f$(i),z,y%:syssa,fy(i),fx(i),0,f$(i):z=z+1:goto20
26 rem-return und crsr unten
27 syssa,fy(i),fx(i),0,f$(i):i=i+1:r=-1:return
28 rem-delete
29 ifz<=1goto20
30 :syss4,ah$,bh$,f$(i),z,y%:z=z-1:syssa,fy(i),fx(i),0,f$(i):goto20
31 rem-crsr rechts
32 z=z+1:ifz>fl(i)thenz=1
33 goto20
34 z=z-1:ifz<1thenz=fl(i)
35 goto20
36 rem-gross
37 goto20
38 rem-sh return
39 goto20
40 rem-crsr oben
41 syssa,fy(i),fx(i),0,f$(i):ifi>1theni=i-1:r=1:return
42 :i=1:r=1:return
43 rem-insert
44 ifz>=fl(i)goto20
45 :syss4,ah$,bh$,f$(i),z,y%:syssa,fy(i),fx(i),0,f$(i):goto20
46 ve=2:aa$=ah$:return
48 ve=1:aa$=ah$:return
49 goto20
50 rem-start
51 gosub8
52 gosub12
53 i=1
54 md$="eingabe":gosub62000
55 ve=0:gosub18:ifve>0goto63
56 j=i+r:k=0
57 onjgosub75,81,83,86,91
58 ifk=0then61
59 md$="eingabefehler":gosub62000
60 syssa,fy(i),fx(i),0,""f$(i)"[154]":goto55
61 ifi>fatheni=fa
62 goto54
63 ifve=2thenreturn
64 md$="eingabekontrolle":gosub62000
65 jj=0
66 forj=1tofa:k=0
67 :onjgosub75,81,83,86,91
68 :ifk=0then72
69 :ifjj=0thenjj=j
70 :md$="eingabefehler":gosub62000
71 :i=j:syssa,fy(i),fx(i),0,""f$(i)"[154]":gosub6
72 :nextj
73 ifjj>otheni=jj:goto55
74 return
75 ifmid$(f$(1),2,1)<"0"ormid$(f$(1),2,1)>"9"thenf$(1)=" "+mid$(f$(1),1,1)
76 syssa,fy(1),fx(1),0,f$(1)
77 th=val(f$(j))
78 ifth< 1orth>31thenk=j:i=j:return
79 f1$=f$(1)+"."+mid$(dn$,3,2)+"."+mid$(dn$,1,2)
80 return
81 rem text
82 return
83 rem wert
84 syss7,f$(3),2:syssa,fy(3),fx(3),0,f$(3)
85 return
86 rem konto
87 forkk=1toka
88 :iff$(j)=kz$(kk)thengosub54060:return
89 :next
90 k=j:i=j:return
91 rem verw.
92 forkk=1tova
93 :iff$(j)=vz$(kk)thengosub54110:return
94 :next
95 k=j:i=j:return
100 poke53280,11:poke53281,0:print"[154]";chr$(142);chr$(8);
101 gosub5000
102 ifpeek(49152)<>76thenload"masch*",8,1
103 ifpeek(828)=0thenload"string.ma",8,1
104 sm=199:dims$(199):dims%(199)
105 dimt$(32):dimh$(2)
107 l$=" "+""
109 ep=1.000001
110 fori=0tosm:s$(i)=" "+"":nexti
120 forj=1to32:t$(j)="12345678901"+"":nextj
122 h$(1)="1234567"+"":h$(2)=chr$(32)
130 s1=49152:rem sorter
131 s2=50150:rem editor 1
132 s3=50155:rem editor 2
133 s4=50350:rem delete
134 s5=50550:rem zahl speichern
135 s6=50600:rem zahl holen
136 s7=50650:rem zahlernformat
137 s8=50950:rem get#,anz
138 s9=51150:rem print at
139 sa=51165:rem print at
140 sb=51250:rem sucher
141 sc=51550:rem scrollen
142 sd=51555:rem scrollen
143 se=51859:rem centronics
144 sf=828 :rem substring
145 sg=51200:rem dev. present
160 md$="datendisk einl., taste druecken"
170 gosub62500
180 dimg1$(3):dimg2$(3)
181 g1$(0)="[146] [146]":g2$(0)="[146] [146]"
182 g1$(1)="[146][180][146]":g2$(1)="[146][170][146]"
183 g1$(2)="[146][161][146]":g2$(2)="[161][146]"
184 g1$(3)="[170][146]":g2$(3)="[165][146]"
200 print"[154]";:fp=1
300 dimkn$(13):dimkz$(13)
400 dimvn$(21):dimvz$(21)
500 ha$=" "
501 i1$=l$
502 b$=left$(l$,3)
503 f1$="tt.mm.jj"+""
504 i3$=l$+l$
505 a$=left$(l$,42)
506 i2$=l$
507 i4$=l$
508 i5$=left$(i3$,46)
509 i6$=left$(i3$,42)
510 h1$=left$(l$,1)
511 h2$=left$(l$,2)
512 h3$=left$(l$,3)
513 h4$=left$(l$,4)
514 h6$=left$(l$,6)
515 h7$=left$(l$,7)
516 h8$=left$(l$,8)
517 hr$=left$(l$,11)
518 dn$=left$(l$,4)
519 da$=left$(l$,4)
520 tb$=""
700 mg=41
701 zh=int(s6/256):zl=s6-zh*256
702 poke785,zl:poke786,zh
705 def fnkb(r)=usr((32*r+nr- 1)*6)
706 def fnvb(r)=usr((32*r+nr+11)*6)
710 dimf$(5):gosub56500
720 dimfx(5):dimfy(5):dimfl(5):fa=5
730 fy(1)= 2:fx(1)= 9:fl(1)= 2
740 fy(2)= 4:fx(2)= 9:fl(2)=31
750 fy(3)= 6:fx(3)= 9:fl(3)=11
760 fy(4)= 8:fx(4)= 9:fl(4)= 1
770 fy(5)=10:fx(5)= 9:fl(5)= 1
810 dimm$(12)
811 m$(1)="jan."
812 m$(2)="feb."
813 m$(3)="mrz."
814 m$(4)="apr."
815 m$(5)="mai "
816 m$(6)="juni"
817 m$(7)="juli"
818 m$(8)="aug."
819 m$(9)="sep."
820 m$(10)="okt."
821 m$(11)="nov."
822 m$(12)="dez."
1000 rem bilanzen einlesen
1010 open3,8,15
1020 gosub21500:rem open bilanzen
2000 fp=2:close6
2010 print"[147]hauptmenue haushaltsbuch";
2011 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
2020 print" eingabe = e"
2030 print" durchsicht = d"
2040 print" auswertung = a"
2045 print" kontenarten = k"
2050 print" programmende = p"
2060 syss9,17,0:ai$="":input" auswahl ";ai$
2065 ifai$="_"then2000
2070 ifai$="e"then4000
2080 ifai$="d"then6000
2090 ifai$="a"then12000
2095 ifai$="k"then25000
2100 ifai$="p"thenend
2110 goto2060
2500 rem monatsabfrage
2502 j1=int((ma-1)/12)+1:m1=ma-(j1-1)*12
2504 syssf,h4$,str$(m1+100),1,3,2
2505 syssf,h4$,str$(j1+100),3,3,2
2510 ifdn$=" "then2520
2511 syssf,h4$,dn$,1,3,2
2512 syssf,h4$,dn$,3,1,2
2520 syssa,20,28,1,h4$
2530 syss9,20,12:input"monat mmjj ";hj$:syssf,h4$,hj$,1,1,4
2535 ifhj$="_"thenonfpgoto101,2000,12000
2540 syssf,h2$,h4$,1,1,2:m1=val(h2$):syssf,h2$,h4$,1,3,2:j1=val(h2$)
2545 mu=12*(j1-1)+m1
2550 ifm1<1orm1>12ormu<ma-mt ormu>ma+1goto2500
2560 syssf,dn$,h4$,1,3,2
2561 syssf,dn$,h4$,3,1,2
2570 gosub63000
2580 iffm=62then2500
2590 return
2600 rem monatsabfrage
2602 j1=int((ma-1)/12)+1:m1=ma-(j1-1)*12
2604 syssf,h4$,str$(m1+100),1,3,2
2605 syssf,h4$,str$(j1+100),3,3,2
2610 ifdn$=" "then2620
2611 syssf,h4$,dn$,1,3,2
2612 syssf,h4$,dn$,3,1,2
2620 syssa,4,29,1,h4$
2630 syss9,4, 1:input"monat mmjj ";hj$:syssf,h4$,hj$,1,1,4
2635 ifhj$="_"thenonfpgoto101,2000,12000
2640 syssf,h2$,h4$,1,1,2:m1=val(h2$):syssf,h2$,h4$,1,3,2:j1=val(h2$)
2650 ifm1<1orm1>12goto2600
2660 syssf,dn$,h4$,1,3,2
2661 syssf,dn$,h4$,3,1,2
2670 gosub63000
2680 iffm=62then2600
2690 return
2700 rem monatsabfrage
2702 j1=int((ma-1)/12)+1:m1=ma-(j1-1)*12
2704 syssf,h4$,str$(m1+100),1,3,2
2705 syssf,h4$,str$(j1+100),3,3,2
2710 ifdn$=" "then2720
2711 syssf,h4$,dn$,1,3,2
2712 syssf,h4$,dn$,3,1,2
2720 syssa,20,29,1,h4$
2730 syss9,20, 9:input"monat mmjj ";hj$:syssf,h4$,hj$,1,1,4
2735 ifhj$="_"thenonfpgoto101,2000,12000
2740 syssf,h2$,h4$,1,1,2:m1=val(h2$):syssf,h2$,h4$,1,3,2:j1=val(h2$)
2750 ifm1<1orm1>12goto2700
2760 syssf,dn$,h4$,1,3,2
2761 syssf,dn$,h4$,3,1,2
2770 gosub63000
2780 iffm=62then2700
2790 return
3000 rem open#4
3010 ifce=1then3100
3020 d%=4
3030 syssg,d%
3040 ifd%=0thenopen4,4:return
3050 md$="drucker einschalten, taste dreucken":gosub62500:goto3000
3100 sys51859
3110 md$="drucker einschalten":gosub62000
3120 open4,5
3130 md$="es wird gedruckt":gosub62000
3140 return
3500 rem hires copie
3510 ifce<>1thenreturn
3520 sys51859:open1,7:print#1," ";chr$(0):close7:return
4000 rem neuaufnahme
4003 ifcs=1thenmd$="alte bestandsdisk eingelegt":gosub62500:goto2000
4009 gosub2500
4010 sp=0:md$=""
4020 gosub55000
4025 gosub56000
4026 gosub53000
4030 gosub50
4040 gosub58000
4100 rem poke198,0:wait198,1:getaa$
4200 ifaa$<>chr$(136)andaa$<>chr$(133)then4500
4301 :gosub57000:gosub55000
4302 :gosub11
4303 :md$="eingabe wird verbucht"
4304 :gosub62000
4322 :gosub49000
4323 :p=1:gosub30000
4325 :v=1:gosub46000
4340 :gosub39500:ifaa$=chr$(136)goto2000
4345 :goto4025
4500 ifaa$<>chr$(137)then4600
4510 :md$="eingaben nicht uebernommen"
4520 :gosub62000
4530 :goto4025
4600 ifaa$<>chr$(140)then4700
4610 :gosub39500:goto2000
4700 goto4100
5000 rem titel
5010 print"[147]haushaltsbuch haushaltsbuch";
5020 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
5030 print" (c) juergen knoepke"
5040 print" gartenstr. 10"
5050 print" 3339 soellingen"
5060 print" 05354/691"
5070 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
5080 print"hinweis: die meisten funktionen koennen"
5090 print" durch eingabe von '_' (rest"
5100 print" spaces) abgebrochen werden"
5110 return
6000 gosub2500:fe=0
6005 print"[147]durchsicht schluessel[154] haushaltsbuch";
6006 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
6007 gosub55075
6030 print""ha$"datum = d"
6040 printha$"konto/datum = k"
6050 printha$"verw./datum = v"
6060 input" auswahl ";ss$
6061 ifss$="_"then2000
6064 ifss$<>"d"andss$<>"k"andss$<>"v"then6005
6070 input" ab tag 1[157][157][157]";h$:tt=val(h$)
6071 ifh$="_"then2000
6075 iftt<1ortt>31thenprint"[145][145]":goto6070
6080 ifss$<>"k"then6200
6090 input" konto ";h$
6091 ifh$="_"then2000
6100 fory=1toka
6110 :ifh$<>kz$(y)thennext
6120 ify>kathenprint"[145]";:goto6090
6200 ifss$<>"v"then6290
6210 input" verwendung ";h$
6211 ifh$="_"then2000
6220 fory=1tova
6230 :ifh$<>vz$(y)thennext
6240 ify>vathenprint"[145]";:goto6210
6290 gosub32000:ife%=0thenmd$="keine buchung zur auswahl":gosub62500:goto2000
6291 p=0
6292 p=p+1:ifasc(s$(s%(p)))-70<tt andp<e%then6292
6293 md$=str$(e%)+" buchungen zur auswahl":gosub62000
6300 gosub31000
6320 gosub55000
6325 gosub57000
6330 gosub11
6340 gosub53000
6350 md$="funktionstaste waehlen"
6360 gosub62000
6400 poke198,0:wait198,1:getaa$
6410 ifaa$<>chr$(133)then6500
6420 :ifp<e%then6425
6421 :md$="letzte buchung ist angezeigt"
6422 :gosub62000
6423 :goto6400
6425 :p=p+1:gosub31000
6440 :md$="letzter satz unveraendert"
6450 :gosub62000
6460 :goto6325
6500 ifaa$<>chr$(134)then6600
6520 :ifp>1then6525
6521 :md$="erste buchung ist angezeigt"
6522 :gosub62000
6523 :goto6400
6525 :p=p-1:gosub31000
6540 :md$="letzter satz unveraendert"
6550 :gosub62000
6560 :goto6325
6600 ifaa$<>chr$(136)then6700
6610 :goto2000
6700 goto6800
6701 :v=-1:gosub46000
6703 :gosub58000
6704 :gosub33000
6730 :v= 1:gosub46000
6740 :gosub39500:gosub32000
6760 :md$="aenderung uebernommen"
6770 :gosub62000
6780 :goto6400
6800 ifaa$<>chr$(138)then6900
6820 :ifcs=1thenmd$="alte bestandsdisk eingelegt":gosub62500:goto6900
6840 :v=-1:gosub46000
6859 :gosub34000
6860 :gosub39500:gosub32000
6865 :md$="satz geloescht"
6870 :gosub62000
6900 ifaa$<>chr$(137)then7000
6905 :ifcs=1thenmd$="alte bestandsdisk eingelegt":gosub62500:goto7000
6909 :gosub53500
6910 :gosub50
6920 :ifaa$="[137]"oraa$="[140]"then6320
6930 :md$="aenderung wird verbucht"
6940 :gosub62000
6950 :gosub53000
6960 :goto6701
7000 ifom$="n"then6350
7010 goto6400
8000 rem bilanzen
8040 j1=int((ma-1)/12)+1:m1=ma-(j1-1)*12
8045 syssf,h4$,str$(m1+100),1,3,2
8046 syssf,h4$,str$(j1+100),3,3,2
8050 syssa,21,29,1,h4$
8055 syss9,21, 9:input"monat mmjj ";hj$:syssf,h4$,hj$,1,1,4
8056 ifhj$="_"then12000
8060 syssf,h2$,h4$,1,1,2:m1=val(h2$):syssf,h2$,h4$,1,3,2:j1=val(h2$)
8070 ifm1<1orm1>12goto8000
8080 mu=12*(j1-1)+m1:ifmu<ma-mt ormu>magoto8000
8090 gosub48000
8100 gosub62800
8110 goto12010
12000 fp=3:aj$=""
12010 print"[147]auswertung haushaltsbuch";
12012 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
12020 print" bilanzen graphik = 1"
12030 print" bilanzen screen = 2"
12040 print" bilanzen drucker = 3"
12050 print" buchungen screen = 4"
12060 print" buchungen drucker = 5"
12062 print" bilanzkorrektur = 6"
12065 print" hauptmenue = 0"
12067 syssa,18,29,1,aj$
12070 syss9,18,0:input" auswahl ";aj$
12080 ifaj$="4"thensp=1:goto14000
12090 ifaj$="5"thensp=2:goto14000
12100 ifaj$="2"then8000
12105 ifaj$="1"then26000
12110 ifaj$="3"then16000
12122 ifaj$="6"then20000
12125 ifaj$="0"oraj$="_"then2000
12130 goto12067
14000 rem buchungen
14005 ifsp=2thengosub3000
14010 ifsp=1thenprint"[147]buchungen screen haushaltsbuch";
14011 ifsp=2thenprint"[147]buchungen drucker haushaltsbuch";
14012 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
14015 gosub55075:gosub2600
14016 input" von tag 1 [157][157][157][157]";h$:t1=val(h$):ifh$="_"then12000
14017 ift1<1ort1>31thenprint"[145][145][145]":goto14016
14018 input" bis tag 31[157][157][157][157]";h$:t2=val(h$):ifh$="_"then12000
14019 ift1>t2ort2>31thenprint"[145][145]":goto14018
14020 input" k[146]onto, v[146]erw. oder $[146] alles ";b3$:b1$=b3$
14021 ifb1$="_"then12000
14025 ifb1$="$"thenb1$="k":b2$="$":goto14045
14030 if b1$<>"k"andb1$<>"v"thenprint"[145][145]":goto14020
14040 input" kurzzeichen (alles=$) ";b2$
14041 ifb2$="_"then12000
14045 ifb2$="$"theny=1:goto14120
14050 ifb1$<>"k"then14090
14060 fory=1toka
14070 :ifb2$<>kz$(y)thennext
14075 ify>kathenprint"[145][145]":goto14040
14080 goto14120
14090 fory=1tova
14100 :ifb2$<>vz$(y)thennext
14101 ify>vathenprint"[145][145]":goto14040
14120 ss$=b1$:gosub32000
14130 p=0:ife%=0then14500
14140 p=p+1:ifasc(s$(s%(p)))-70<t1 andp<e%then14140
14150 ifasc(s$(s%(p)))-70>t2then14500
14161 zz=0:syssf,hr$," 0.00",1,1,11
14163 h4=0:x=0:gosub45000:h=ma-(12*(j1-1)+m1-1):ifh>mtthenx=0:gosub45000:goto14165
14164 ifb1$="k"thennr=y:x=fnkb(h):gosub45000
14165 ifb1$="k"thenh4=1
14166 gosub14640
14170 gosub31000
14190 ifasc(b$)-70>t2then14500
14191 gosub57000
14195 x=val(hr$)+val(f$(3)):gosub45000
14198 syssf,h1$,b$,1,3,1:ifb1$="k"thensyssf,h7$,vn$(asc(h1$)-70),1,1,7
14199 syssf,h1$,b$,1,2,1:ifb1$="v"thensyssf,h7$,kn$(asc(h1$)-70),1,1,7
14200 syssf,i1$,f$(1),1,1,2
14201 syssf,i1$,f$(2),4,1,15
14202 syssf,i1$,"/",19,1,1
14203 syssf,i1$,f$(3),21,1,11
14204 syssf,i1$,h7$,33,1,7
14210 syssf,i2$,f$(2),4,16,16
14220 syssf,i3$,f1$,1,1,8
14221 syssf,i3$,f$(2),11,1,31
14222 syssf,i3$,f$(3),46,1,11
14224 syssf,i3$,h7$,59,1,7
14226 ift1=1thensyssf,i3$,hr$,68,1,11
14227 ift1>1thensyssf,i3$,l$,68,1,11
14240 zz=zz+1
14250 ifsp=2then14390
14260 ifzz<12thenprinti1$;:printi2$;
14270 ifzz>11thensyssc,2,23,i1$;:syssc,2,23,i2$;
14370 ifzz<>int(zz/11)*11then14390
14380 md$="weiter: taste druecken":gosub62000
14381 gethz$:ifhz$=""then14381
14382 ifhz$="_"then12000
14385 md$="anzeige buchungen":gosub62000
14390 ifsp=1then14410
14395 syssa,22,0,1,i1$;i2$;
14400 print#4,i3$:gethz$:ifhz$="_"then12000
14405 gosub14600
14410 ifp=e%then14500
14415 p=p+1:gosub31000
14420 goto14190
14500 ifsp=2ande%>0thenforj=1to77:print#4,"-";:nextj:print#4,"-"
14501 ifsp=2ore%=0then14506
14502 md$="weiter: taste druecken":gosub62000
14503 gethz$:ifhz$=""then14503
14504 ifhz$="_"then12000
14505 md$="anzeige buchungen":gosub62000
14506 ifb2$="$"andb1$="k"andy<katheny=y+1:goto14120
14510 ifb2$="$"andb1$="v"andy<vatheny=y+1:goto14120
14550 ifb1$="k"andb3$="$"thenb1$="v":goto14045
14555 ifsp<>1thenprint#4,chr$(12):close4
14599 goto12000
14600 h=0:ifsp=1andzz=int(zz/10)*10thenh=1
14610 ifsp=2andzz=int(zz/60)*60thenh=2
14620 ifh<>1andh<>2 then return
14640 ifb1$="k"thensyssf,i4$,"konto ",1,1,7
14645 ifb1$="k"thensyssf,i4$,kn$(y),8,1,7
14650 ifb1$="v"thensyssf,i4$,"verw. ",1,1,7
14655 ifb1$="v"thensyssf,i4$,vn$(y),8,1,7
14660 syssf,i4$," buchungen ",22,1,11
14662 syssf,i4$,m$(m1),33,1,4
14664 syssf,i4$,str$(j1+100),38,3,2
14670 ifsp<>1then14720
14680 print"[147]"i4$;
14690 print"----------------------------------------";
14710 return
14720 rem
14740 print#4:print#4:print#4:print#4,chr$(14)i4$
14750 forj=1to77:print#4,"-";:next
14751 print#4,"-"
14760 ift1<>1thenh4=0
14761 ifh4<>0thenprint#4,">>>>>>>> anfangsstand "hr$:h4=0
14762 zz=0
14770 return
16000 rem bilanzendruck
16020 print"[147]bilanzen drucker haushaltsbuch";
16021 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
16022 j1=int((mb-1)/12)+1:m1=ma-mt-(j1-1)*12
16023 syssf,h4$,str$(m1+100),1,3,2:syssf,h4$,str$(j1+100),3,3,2
16024 syssa,4,23,1,h4$
16025 syss9,4,10:input"von : mmjj ";hj$:syssf,h4$,hj$,1,1,4:ifhj$="_"then12000
16026 syssf,h2$,h4$,1,1,2:m1=val(h2$):syssf,h2$,h4$,1,3,2:j1=val(h2$)
16027 ifm1<1orm1>12goto16022
16028 mu=12*(j1-1)+m1:ifmu<ma-mt ormu>magoto16022
16032 j2=int(ma/12)+1:m2=ma-(j2-1)*12
16033 syssf,h4$,str$(m2+100),1,3,2:syssf,h4$,str$(j2+100),3,3,2
16034 syssa,6,23,1,h4$
16035 syss9,6,10:input"bis : mmjj ";hj$:syssf,h4$,hj$,1,1,4:ifhj$="_"then12000
16036 syssf,h2$,h4$,1,1,2:m2=val(h2$):syssf,h2$,h4$,1,3,2:j2=val(h2$)
16037 ifm2<1orm2>12goto16032
16038 mo=12*(j2-1)+m2:ifmo<muormo>magoto16032
16100 gosub3000
16120 print#4:print#4:print#4
16130 print#4,chr$(14)" kontostaende "m$(m1)" "str$(j1)" - "m$(m2)" "str$(j2)
16155 fork=1toint((ka-1)/6)+1
16156 :ug=6*(k-1)+1
16157 :og=ug+5:ifog>kathenog=ka
16160 :print#4
16170 :fori=1to79:print#4,"-";:nexti
16180 :print#4
16190 :print#4,"monat ";
16200 :fori=ugtoog:print#4," "kn$(i);:nexti
16220 :fori=mutomo
16225 : print#4
16230 : jh=int((i-1)/12)+1
16240 : mh=i-12*(jh-1)
16250 : print#4,m$(mh)" "mid$(str$(jh),2,2);
16260 : forii=ugtoog
16270 : nr=ii:x=fnkb(ma-i):gosub45000
16280 : print#4," ";hr$;
16290 : nextii
16310 : nexti
16320 :nextk
16324 print#4
16325 fori=1to79:print#4,"-";:next
16326 print#4:print#4:print#4:print#4
16430 print#4,chr$(14)" verwendungen "m$(m1)" "str$(j1)" - "m$(m2)" "str$(j2)
16455 fork=1toint((va-1)/6)+1
16456 :ug=6*(k-1)+1
16457 :og=ug+5:ifog>vathenog=va
16460 :print#4
16470 :fori=1to79:print#4,"-";:nexti
16480 :print#4
16490 :print#4,"monat ";
16500 :fori=ugtoog:print#4," "vn$(i);:nexti
16520 :fori=mutomo
16525 : print#4
16530 : jh=int((i-1)/12)+1
16540 : mh=i-12*(jh-1)
16550 : print#4,m$(mh)" "mid$(str$(jh),2,2);
16560 : forii=ugtoog
16570 : nr=ii:x=fnvb(ma-i):gosub45000
16580 : print#4," ";hr$;
16590 : nextii
16610 : nexti
16620 :nextk
16624 print#4
16625 fori=1to79:print#4,"-";:next
16626 print#4:print#4:print#4:print#4
16730 print#4,chr$(14)" bilanzsummen "m$(m1)" "str$(j1)" - "m$(m2)" "str$(j2)
16760 :print#4:gosub16900
16770 :fori=1to38:print#4,"-";:nexti
16780 :print#4:gosub16900
16790 :print#4,"monat verwendungen kontostaende"
16820 :fori=mutomo
16825 : print#4:gosub16900
16830 : jh=int((i-1)/12)+1
16840 : mh=i-12*(jh-1)
16850 : print#4,m$(mh)" "mid$(str$(jh),2,2)" ";
16855 : xn=0:forj=1toka:nr=j:xn=fnkb(ma-i)+xn:nextj
16860 : yn=xn-xa:ifi=muthenyn=0:forj=1tova:nr=j:yn=fnvb(ma-i)+yn:nextj
16870 : x=yn:gosub45000:print#4,hr$;" ";
16880 : x=xn:gosub45000:print#4,hr$;
16885 : xa=xn
16890 : nexti
16891 :print#4:gosub16900
16892 :fori=1to38:print#4,"-";:nexti
16893 :print#4,chr$(12)
16898 close4
16899 goto12000
16900 forj=1to22:print#4," ";:nextj:return
20000 rem monatsbilanzen erneuern
20001 gosub2700
20002 mu=12*(j1-1)+m1:ifmu<ma-mt ormu>mathenclose6:goto20000
20003 md$="augenblick bitte":gosub62000
20004 fork=1toka
20005 :nr=k:ifmu>=mathen20008
20006 :forj=0toma-mu-1:h=fnkb(j)-(fnkb(ma-mu-1)-fnkb(ma-mu))
20007 :syss5,(32*j+k-1)*6,h:nextj
20008 :h=0:ifma-mu<mtthenh=fnkb(ma-mu+1)
20009 :syss5,(32*(ma-mu)+k-1)*6,h:nextk
20010 fork=1tova
20011 :nr=k
20012 :ifmu>=mathen20016
20013 :forj=0toma-mu-1:h=fnvb(j)-(fnvb(ma-mu-1)-fnvb(ma-mu))
20014 :syss5,(32*j+k+11)*6,h:nextj
20016 :syss5,(32*(ma-mu)+k+11)*6,0
20017 :nextk
20018 gosub60000:gosub23500:gosub63000:ss$="d":gosub32000:p=0:gosub55000
20019 p=p+1:ifp>e%thenclose6:goto12000
20020 gosub31000
20030 gosub57000
20050 gosub11
20060 md$="noch"+str$(e%-p+1)+" buchungen":gosub62000
20090 v=1
20100 gosub46000
20180 goto20019
21000 rem bilanzen und bez. einlesen
21010 z=0:gosub38000
21020 h$="1234567890a"+"":syss8,1,6,0,h$
21030 mb=val(mid$(h$, 1,4))
21040 ma=val(mid$(h$, 5,4))
21042 ka=asc(mid$(h$, 9,1))
21044 va=asc(mid$(h$,10,1))
21045 ce=asc(mid$(h$,11,1))
21046 cs=0:ifce>9thence=ce-10:cs=1
21060 forj=1to12
21080 :syss8,2,6,0,h$(1)
21090 :kn$(j)=h$(1):kz$(j)=h$(2)
21100 :nextj
21110 forj=1to20
21120 :syss8,2,6,0,h$(1)
21130 :vn$(j)=h$(1):vz$(j)=h$(2)
21140 :nextj
21150 mt=mg:ifma-mb<mgthenmt=ma-mb
21160 z=33+32*(ma-mb-mt):gosub38000
21170 forj=mtto0step-1
21180 :syss8,32,6,0,t$(1)
21190 :fori=1to12:h=val(t$(i)):syss5,(32*j+i-1)*6,h:nexti
21200 :fori=1to20:h=val(t$(i+12)):syss5,(32*j+i+11)*6,h:nexti
21210 :nextj
21220 return
21500 rem bilanzen eroeffnen
21510 open6,8,6,"hb-bilanzen"
21520 input#3,fm
21530 iffm<>62thengosub61002:gosub21000:return
21540 gosub21800:print"";fm
21570 return
21800 rem keine bilanzen auf disk
21810 print"[147]"
21820 print" keine bilanz-datei auf bestandsdisk !"
21830 print" bitte zutreffenden buchstaben eingeben"
21840 print" a) sie haben aus versehen eine falsche"
21850 print" bestandsdiskette eingelegt."
21860 print" b) die eingelegte diskette soll ihre "
21870 print" erste bestandsdiskette werden."
21880 print" c) sie wollen auf dieser bestands-"
21890 print" diskette ihre bestehende haushalts-"
21900 print" buchhaltung fuer einen neuen monat"
21910 print" fortsetzen (letzte diskette ist"
21920 print" nahezu voll)."
21922 print" auf der alten disk kann dann nicht"
21924 print" mehr gebucht werden."
21844 poke198,0:wait198,1:geth$
21940 ifh$="a"thenrun
21950 ifh$="b"thengosub22000:return
21960 ifh$="c"thengosub22500:return
21970 goto21844
22000 rem erste bestandsdisk
22005 close6:close3
22010 print"[147] programmdisk einlegen, taste druecken"
22015 gosub62800
22020 open3,8,15:gosub60000
22040 gosub21000:rem datei einlesen
22045 input"[147]beginmonat der buchhaltung mmjj";hj$:syssf,h4$,hj$,1,1,4
22046 syssf,h2$,h4$,1,1,2:mm=val(h2$):syssf,h2$,h4$,1,3,2:jj=val(h2$)
22047 ifmm<1ormm>12thenprint"[145][145][145][145]":goto22045
22050 mb=12*(jj-1)+mm:ma=mb
22055 close6:close3
22060 print" bestandsdisk einlegen, taste druecken"
22065 gosub62800
22070 open3,8,15:open6,8,6,"hb-bilanzen,l,"+chr$(11)
22072 mt$="disk voll":gosub61000
22073 z=1400:gosub38000:gosub61000:print#6,"12345678.01";:gosub61000
22080 gosub23500:rem werte speichern
22090 gosub23000:rem bezeichnugn spei.
22095 close6
22100 return
22500 rem weitere bestandsdisk
22505 close6:close3
22510 print"[147] letzte bestands-disk einlegen und"
22515 print" taste druecken"
22517 gosub62800:open3,8,15
22520 gosub60000
22540 gosub21000:rem datei einlesen
22542 ch=ce+10:z=0:gosub38000
22544 print#6,mid$(str$(10000+mb),3)mid$(str$(10000+ma),3)chr$(ka)chr$(va)chr$(ch);
22555 close6:close3
22560 print" neue bestandsdisk einlegen und"
22565 print" taste druecken"
22567 gosub62800
22570 open3,8,15:open6,8,6,"hb-bilanzen,l,"+chr$(11)
22573 z=1400:gosub38000:gosub61000:print#6,"12345678.01";:gosub61000
22580 gosub23500:rem werte speichern
22590 gosub23000:rem bezeichnugn spei.
22595 close6
22600 return
23000 rem bezeichungen speichern
23010 z=0:gosub38000
23015 print#6,mid$(str$(10000+mb),3)mid$(str$(10000+ma),3)chr$(ka)chr$(va)chr$(ce);
23020 fori=1to12:print#6,kn$(i)kz$(i);:nexti
23030 fori=1to20:print#6,vn$(i)vz$(i);:nexti
23040 return
23500 rem bilanzen speichern
23501 z=mt*32+32+1:gosub38000:print#6,"ende";
23510 z=0:gosub38000
23520 print#6,mid$(str$(10000+mb),3)mid$(str$(10000+ma),3)chr$(ka)chr$(va)chr$(ce);
23530 z=33:gosub38000:ma=mb+mt
23560 forj=mtto0step-1
23570 :fori=1to12:nr=i:x=fnkb(j):gosub45000:print#6,hr$;:nexti
23580 :fori=1to20:nr=i:x=fnvb(j):gosub45000:print#6,hr$;:nexti
23585 :nextj
23590 return
25000 rem namen aendern
25010 print"[147]namensaenderung haushaltsbuch";
25020 print"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]";
25030 gosub 55075
25040 gosub25600
25080 input" k[146]onto oder v[146]erwendung";h$
25085 ifh$<>"k"andh$<>"v"then25080
25090 hh$="":input" laufende nummer ";hh$:h=val(hh$)
25100 ifh<1or(h$="k"and(h>12orh>ka+1))or(h$="v"and(h>20orh>va+1))then25090
25110 hh$="":input" kurzbezeichnung ";hh$:hh$=mid$(hh$+" ",1,1)
25120 ifh$="v"then25230
25130 fori=1toka
25140 :ifi=horhh$<>kz$(i)then25160
25150 :md$="bezeichung schon vergeben":gosub62000:goto25110
25160 :nexti
25170 ifh=kaandhh$=" "thenkz$(ka)=" ":kn$(ka)=" ":ka=ka-1:goto25400
25175 ifhh$=" "then25110
25180 ifh=ka+1thenka=ka+1
25190 kz$(h)=hh$
25195 goto25300
25230 fori=1tova
25240 :ifi=horhh$<>vz$(i)then25260
25250 :md$="bezeichung schon vergeben":gosub62000:goto25110
25260 :nexti
25270 ifh=vaandhh$=" "thenvz$(va)=" ":vn$(va)=" ":va=va-1:goto25400
25275 ifhh$=" "then25110
25280 ifh=va+1thenva=va+1
25290 vz$(h)=hh$
25300 gosub25600:hh$=""
25305 input" bezeichung ";hh$:hh$=mid$(hh$+" ",1,7)
25310 ifh$="k"thenkn$(h)=hh$
25320 ifh$="v"thenvn$(h)=hh$
25400 gosub55075
25410 input" weiter (j/n) ";hh$
25420 ifhh$="j"then25000
25430 ifhh$<>"n"then25410
25431 input" druckerport: s[146]eriell/u[146]ser ";hh$
25432 ifhh$<>"s"andhh$<>"u"thenprint"[145][145][145]":goto25431
25433 ce=0:ifhh$="u"thence=1
25435 gosub60000
25440 gosub23000
25450 goto2000
25600 print"-loeschen des letzten kontos bzw verw."
25610 print" durch bezeichung 'space' "
25620 print"-kurzbez. muessen eindeutig sein ";
25630 return
26000 rem grafik
26010 print"[147]bilanzen grafik haushaltsbuch";
26020 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
26030 print" was wollen sie sich ansehen ?"
26040 print" kontenuebersicht fuer einen monat = 1"
26050 print" verw.-uebersicht fuer einen monat = 2"
26055 print" monatsuebersicht fuer ein konto = 3"
26060 print" monatsuebersicht fuer eine verw. = 4"
26065 print" hauptmenue = 0"
26070 input" auswahl ";h$
26080 ifh$="1"orh$="2"then27000
26081 ifh$="3"orh$="4"then28000
26082 ifh$="0"orh$="_"then12000
26083 print"[145][145][145]":goto26070
27000 print"[147]bilanzen grafik haushaltsbuch";
27001 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
27009 j1=int((ma-1)/12)+1:m1=ma-(j1-1)*12
27010 hh$=mid$(str$(m1+100),3)+mid$(str$(j1+100),3)
27020 syssa, 5,29,1,hh$
27030 syss9, 5, 9:input"monat mmjj ";hh$
27031 ifhh$="_"then12000
27040 m1=val(mid$(hh$,1,2)):j1=val(mid$(hh$,3,2))
27050 ifm1<1orm1>12goto27000
27060 mu=12*(j1-1)+m1:ifmu<ma-mt ormu>magoto27000
27070 ifh$="2"then27500
27100 rem alle konten
27105 m=ma-mu
27110 kl=0:gr=0
27111 j1=int((ma-m-1)/12)+1:m1=ma-m-(j1-1)*12
27120 fornr=1toka
27130 :iffnkb(m)<klthenkl=fnkb(m)
27140 :iffnkb(m)>grthengr=fnkb(m)
27150 :nextnr
27155 kl=-kl
27160 ifgr-kl=0thenmd$="alle konten sind null":gosub62500:goto26000
27170 cb=gr/15:ifkl>grthencb=kl/15
27210 print"[147]grafik konten "m$(m1)" "mid$(str$(j1+100),3,2)"[154] haushaltsbuch";
27220 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
27230 fork=1toka
27240 :nr=k:i1=int(abs(fnkb(m))/cb*ep)
27250 :i2=int((abs(fnkb(m))-i1*cb)/cb*4)
27260 :h=1:gosub29500
27320 :nextk
27330 syssa,22,0,1,"[195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195]";
27340 print"f1 quit f3 verw. f5/f7 auswahl f2 druck";
27350 md$="funktiontaste waehlen":gosub62000
27360 ca=0:cn=0
27370 poke198,0:wait198,1:gethh$
27375 ifhh$="[137]"thengosub3500
27380 ifhh$="[133]"then12000
27390 ifhh$="[134]"then27510
27400 ifhh$="[135]"andca=0thencn=ka+6
27410 ifhh$="[135]"andca>7thencn=ca-1
27420 ifhh$="[136]"andca=0thencn=7
27430 ifhh$="[136]"andca>0andca<ka+6thencn=ca+1
27440 ifhh$=chr$(13)andcn>0thenk=cn-6:goto28100
27450 gosub29000
27460 ca=cn:goto27370
27500 rem alle verw.
27505 m=ma-mu
27510 kl=0:gr=0
27511 j1=int((ma-m-1)/12)+1:m1=ma-m-(j1-1)*12
27520 fornr=1tova
27530 :iffnvb(m)<klthenkl=fnvb(m)
27540 :iffnvb(m)>grthengr=fnvb(m)
27550 :nextnr
27555 kl=-kl
27560 ifgr-kl=0thenmd$="alle verw. sind null":gosub62500:goto26000
27570 cb=gr/15:ifkl>grthencb=kl/15
27610 print"[147]grafik verw. "m$(m1)" "mid$(str$(j1+100),3,2)"[154] haushaltsbuch";
27620 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
27630 fork=1tova
27640 :nr=k:i1=int(abs(fnvb(m))/cb*ep)
27650 :i2=int((abs(fnvb(m))-i1*cb)/cb*4)
27660 :h=2:gosub29500
27720 :nextk
27730 syssa,22,0,1,"[195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195]";
27740 print"f1 quit f3 konto f5/f7 auswahl f2 druck";
27750 md$="funktiontaste waehlen":gosub62000
27760 ca=0:cn=0
27770 poke198,0:wait198,1:gethh$
27775 ifhh$="[137]"thengosub3500
27780 ifhh$="[133]"then12000
27790 ifhh$="[134]"then27110
27800 ifhh$="[135]"andca=0thencn=va+1
27810 ifhh$="[135]"andca>2thencn=ca-1
27820 ifhh$="[136]"andca=0thencn=2
27830 ifhh$="[136]"andca>0andca<va+1thencn=ca+1
27840 ifhh$=chr$(13)andcn>0thenk=cn-1:goto28500
27850 gosub29000
27860 ca=cn:goto27770
28000 rem monatsuebers\
28010 print"[147]grafik haushaltsbuch";
28020 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
28030 gosub55075
28035 ifh$="4"then28050
28040 input" welches konto ";hh$
28041 ifhh$="_"then12000
28042 fork=1toka:ifhh$<>kz$(k)thennext
28044 ifk>kathen28040
28046 goto28100
28050 input" welche verwendung";hh$
28051 ifhh$="_"then12000
28052 fork=1tova:ifhh$<>vz$(k)thennext
28054 ifk>vathen28050
28056 goto28500
28100 rem monatsueb. konten
28110 kl=0:gr=0:nr=k
28120 form=0tomt
28130 :iffnkb(m)<klthenkl=fnkb(m)
28140 :iffnkb(m)>grthengr=fnkb(m)
28150 :nextm
28155 kl=-kl
28160 ifgr-kl=0thenmd$="alle konten sind null":gosub62500:goto26000
28170 cb=gr/15:ifkl>grthencb=kl/15
28210 print"[147]grafik konto "kn$(k)"[154] haushaltsbuch";
28220 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
28225 vs=0:mu=0:mo=mt:ifmo>19thenmo=19
28230 form=0tomo
28235 :j1=int((ma-m-1)/12)+1:m1=ma-m-(j1-1)*12
28240 :nr=k:i1=int(abs(fnkb(m))/cb*ep)
28250 :i2=int((abs(fnkb(m))-i1*cb)/cb*4)
28260 :h=3:gosub29500
28270 :ifvs<>0thenreturn
28320 :nextm
28325 vs=1
28330 syssa,22,0,1,"[195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195]";
28340 print"f1 quit f3 verw. f5/f7 auswahl f2 druck";
28350 ifmt>mothenmd$="funktion waehlen oder scrollen":gosub62000
28355 ifmt<=mothenmd$="funktiontaste waehlen":gosub62000
28360 ca=0:cn=0
28370 poke198,0:wait198,1:gethh$
28375 ifhh$="[137]"thengosub3500
28380 ifhh$="[133]"then12000
28390 ifhh$="[134]"thenh$="4":goto28000
28400 ifhh$="[135]"andca=0thencn=mo+2:m=mo
28410 ifhh$="[135]"andca>2thencn=ca-1:m=m-1
28420 ifhh$="[136]"andca=0thencn=2:m=mu
28430 ifhh$="[136]"andca>0andca<=mo+1andca<21thencn=ca+1:m=m+1
28440 ifhh$=chr$(13)andcn>0then27110
28442 ifhh$=""andmo<mtthensyssc,2,21,;:mo=mo+1:mu=mu+1:m=mo:ca=ca-1:ch=21:gosub28235
28444 ifhh$="[145]"andmu>0thensyssd,2,21,;:mu=mu-1:mo=mo-1:m=mu:ca=ca+1:ch=2:gosub28235
28450 gosub29000
28460 ca=cn:goto28370
28500 rem uebers. verw,
28510 kl=0:gr=0:nr=k
28520 form=0tomt
28530 :iffnvb(m)<klthenkl=fnvb(m)
28540 :iffnvb(m)>grthengr=fnvb(m)
28550 :nextm
28555 kl=-kl
28560 ifgr-kl=0thenmd$="alle verw. sind null":gosub62500:goto26000
28570 cb=gr/15:ifkl>grthencb=kl/15
28610 print"[147]grafik verw. "vn$(k)"[154] haushaltsbuch";
28620 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
28625 vs=0:mu=0:mo=mt:ifmo>19thenmo=19
28630 form=0tomo
28635 :j1=int((ma-m-1)/12)+1:m1=ma-m-(j1-1)*12
28640 :nr=k:i1=int(abs(fnvb(m))/cb*ep)
28650 :i2=int((abs(fnvb(m))-i1*cb)/cb*4)
28660 :h=4:gosub29500
28670 :ifvs<>0thenreturn
28720 :nextm
28725 vs=1
28730 syssa,22,0,1,"[195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195]";
28740 print"f1 quit f3 konto f5/f7 auswahl f2 druck";
28750 ifmt>mothenmd$="funktion waehlen oder scrollen":gosub62000
28760 ca=0:cn=0
28770 poke198,0:wait198,1:gethh$
28775 ifhh$="[137]"thengosub3500
28780 ifhh$="[133]"then12000
28790 ifhh$="[134]"thenh$="3":goto28000
28800 ifhh$="[135]"andca=0thencn=mo+2:m=mo
28810 ifhh$="[135]"andca>2thencn=ca-1:m=m-1
28820 ifhh$="[136]"andca=0thencn=2:m=mu
28830 ifhh$="[136]"andca>0andca<=mo+1andca<21thencn=ca+1:m=m+1
28840 ifhh$=chr$(13)andcn>0then27510
28842 ifhh$=""andmo<mtthensyssc,2,21,;:mo=mo+1:mu=mu+1:m=mo:ca=ca-1:ch=21:gosub28635
28844 ifhh$="[145]"andmu>0thensyssd,2,21,;:mu=mu-1:mo=mo-1:m=mu:ca=ca+1:ch=2:gosub28635
28850 gosub29000
28860 ca=cn:goto28770
29000 rem cursor
29005 ifabs(ca)<=1thenca=0
29006 ifch>0andcn>0thencn=ch:ch=0
29010 ifcn>0andca>0andca<>cnthenfori=1025+ca*40to1031+ca*40:pokei,peek(i)and127:next
29020 ifcn>0thenfori=1025+cn*40to1031+cn*40:pokei,peek(i)or128:next
29040 return
29500 syssf,i5$,l$,1,1,40:nr=k
29501 syssf,i5$,l$,41,1,6
29510 ifh=1thensyssf,i5$,kn$(k),2,1,7:x=fnkb(m)
29520 ifh=2thensyssf,i5$,vn$(k),2,1,7:x=fnvb(m)
29530 ifh=3orh=4thensyssf,i5$,m$(m1),2,1,4:syssf,i5$,str$(j1+100),7,3,2
29535 ifh=3thenx=fnkb(m)
29540 ifh=4thenx=fnvb(m)
29550 gosub45000
29560 ifx<0then29700
29570 syssf,i5$,"",9,1,1
29580 syssf,i5$,hr$,13,1,11
29600 syssf,i5$,"",26,1,1
29610 syssf,i5$,"[146]",27+i1,1,1
29620 syssf,i5$,g1$(i2),28+i1,1,3
29630 syssf,i5$,"[154]",46,1,1
29640 goto29800
29700 syssf,i5$,"[150]",9,1,1
29710 syssf,i5$,g2$(i2),25-i1,1,3
29720 syssf,i5$,"",28-i1,1,1
29730 syssf,i5$,"[146]",29,1,1
29740 syssf,i5$,hr$,31,1,11
29750 syssf,i5$,"[154]",46,1,1
29800 printi5$;
29900 return
30000 rem a$ und b$ abspeichern
30010 ifar<199then30100
30020 md$="nur"+str$(sm)+"[160]buchungen pro monat moeglich"
30030 gosub62500
30050 goto2000
30100 gosub38100:ar=ar+1
30102 z=0:gosub38000
30104 print#6,mid$(str$(1000+ar),3);
30110 z=int((ar-1)/14)+1:zp=ar-(z-1)*14:gosub38000
30112 syss8,1,6,0,i6$
30114 syssf,i6$,b$,3*(zp-1)+1,1,3
30115 gosub38000
30117 print#6,i6$;
30130 z=ar+72:gosub38000
30140 print#6,a$;
30150 h=ar:gosub37500:s$(ar)=h$
30180 return
31000 rem a$ und b$ lesen
31100 gosub37000:rem h = rec. nr.
31120 syssf,b$,s$(s%(p)),1,1,3
31130 z=h+72:zp=1:gosub38000
31140 syss8,1,6,0,a$
31150 return
32000 rem s%(ar) aufbereiten
32010 ifss$="k"orss$="v"then32020
32012 e%=0
32014 ife%=arthenreturn
32015 ifmid$(s$(e%+1),1,1)=chr$(160)thenreturn
32017 e%=e%+1:s%(e%)=e%
32018 goto32014
32020 ifss$="k"thenhs%=2
32030 ifss$="v"thenhs%=3
32032 ha%=0:e%=ar:h$=chr$(y+70)+"?"
32040 syssb,ar,s$(1),h$,s%(1),hs%,ha%,e%
32045 fori=1toe%:s%(i)=s%(i)+1:next
32050 return
33000 rem a$ und b$ aendern
33100 gosub37000:rem h = rec. nr.
33110 z=int((h-1)/14)+1:zp=h-(z-1)*14:gosub38000
33112 syss8,1,6,0,i6$
33114 syssf,i6$,b$,3*(zp-1)+1,1,3
33115 gosub38000
33117 print#6,i6$;
33130 z=h+72:gosub38000
33140 print#6,a$;
33150 gosub37500:s$(s%(p))=h$
33180 return
34000 rem a$ und b$ loeschen
34100 gosub37000:rem h = rec. nr.
34105 b$=chr$(160)+chr$(160)+chr$(160):gosub37500:s$(s%(p))=h$
34110 z=int((h-1)/14)+1:zp=h-(z-1)*14:gosub38000
34112 syss8,1,6,0,i6$
34114 syssf,i6$,b$,3*(zp-1)+1,1,3
34115 gosub38000
34117 print#6,i6$;
34180 return
37000 rem pys. record nr
37010 h=asc(mid$(s$(s%(p)),4,1))+256*asc(mid$(s$(s%(p)),5,1))
37020 return
37500 rem s$ gen
37502 hh=int(h/256)
37504 hl=h-hh*256
37510 h$=b$+chr$(hl)+chr$(hh)
37520 return
38000 rem auf record z pos.
38010 zh=int((z+1)/256):zl=z+1-zh*256
38020 print#3,"p"chr$(6)chr$(zl)chr$(zh)chr$(1)
38030 mt$="disk voll":gosub61000
38060 return
38100 ifint((ar-72)/100)*100<>ar-72thenreturn
38110 md$="datei wird vergroessert":gosub62000
38120 zh=int((ar+101)/256):zl=ar+101-zh*256
38130 print#3,"p"chr$(6)chr$(zl)chr$(zh)chr$(1)
38132 mt$="disk voll":gosub61000
38140 print#6," 0000000.00";:gosub61000
38150 return
39000 rem s$(ar) einlesen
39005 gosub38100
39010 z=0:gosub38000
39020 syss8,1,6,0,h3$:ar=val(h3$)
39030 z=1:gosub38000:syss8,ar,6,2,s$(1)
39080 gosub39500
39090 return
39500 rem s$(ar) sortieren
39510 syss1,ar,s$(1)
39599 return
45000 rem x runden
45005 ifx=0orabs(x)>=1e6then45009
45006 x=x+0.005*sgn(x)
45009 syssf,hr$,l$,1,1,11
45010 syssf,hr$,str$(x),1,1,11
45020 syss7,hr$,2
45030 x=val(hr$)
45040 return
46000 rem buchung in die bilanzen
46005 gosub60000
46010 jh=val(mid$(dn$,1,2))
46020 mh=val(mid$(dn$,3,2))
46030 mh=mh+12*(jh-1)
46033 syssf,hr$,a$,1,1,11
46034 hw=val(hr$)
46035 k=asc(mid$(b$,2,1))-70
46036 l=asc(mid$(b$,3,1))-70
46037 nr=l:ifabs(fnvb(ma-mh)+hw*v)<10e6then46041
46038 md$="ueberlauf bilanzen, nicht gebucht":gosub62500:goto2000
46041 forj=0toma-mh
46042 :nr=k:ifabs(fnkb(j)+hw*v)<10e6then46044
46043 md$="ueberlauf bilanzen, nicht gebucht":gosub62500:goto2000
46044 :nextj
46045 forj=0toma-mh
46050 :nr=k:h=fnkb(j)+hw*v:syss5,(32*j+k-1)*6,h
46052 :nr=k:x=fnkb(j):gosub45000:syss5,(32*j+k-1)*6,x
46053 z=32+(ma-mb-j)*32+k:gosub38000:print#6,hr$;
46055 :nextj
46070 nr=l:h=fnvb(ma-mh)+hw*v:syss5,(32*(ma-mh)+l+11)*6,h
46072 nr=l:x=fnvb(ma-mh):gosub45000:syss5,(32*(ma-mh)+l+11)*6,x
46075 z=44+(mh-mb)*32+l:gosub38000:print#6,hr$;
46079 gosub63000
46080 return
48000 rem bilanzen screen
48160 print"[147]bilanzen "m$(m1)" "mid$(str$(j1+100),3,2)"[154] haushaltsbuch";
48165 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
48170 print" verwendung konten[160]"
48175 yy=0
48180 fori=1tova
48181 :nr=i:x=fnvb(ma-mu):yy=yy+x
48182 :gosub45000
48190 :printvn$(i)":"hr$
48200 :next
48220 print""
48230 xx=0
48280 fori=1toka
48290 :nr=i:x=fnkb(ma-mu):xx=xx+x
48300 :gosub45000
48310 :printtb$kn$(i)":"hr$;
48320 :next
48322 x=xx
48324 gosub45000
48326 print""tb$" summen "
48327 x=xx-yy:gosub45000:print""tb$"vormon.:"hr$;
48328 x=yy:gosub45000:printtb$"verw. :"hr$;
48329 x=xx:gosub45000:printtb$"konten :"hr$;
48330 return
49000 rem monat mit bilanzen aktualis.
49010 jh=val(mid$(f1$,7,2))
49020 mh=val(mid$(f1$,4,2))
49030 mn=12*(jh-1)+mh
49040 ifma>=mnthenreturn
49045 ma=ma+1:mt=mt+1:ifmt>mgthenmt=mg
49050 forkk=1toka
49060 :fork=mtto1step-1
49070 : nr=kk:h=fnkb(k-1):syss5,(32*k+kk-1)*6,h
49080 : nextk
49081 :nextkk
49082 forkk=1tova
49083 :fork=mtto1step-1
49084 : nr=kk:h=fnvb(k-1):syss5,(32*k+kk+11)*6,h
49085 : nextk
49086 :syss5,(kk+11)*6,0
49090 :nextkk
49095 gosub60000
49100 z=0:gosub38000
49110 print#6,mid$(str$(10000+mb),3)mid$(str$(10000+ma),3)chr$(ka)chr$(va)chr$(ce);
49120 z=32*(ma-mb)+33:gosub38000
49130 fori=1to12:nr=i:x=fnkb(0):gosub45000:print#6,hr$;:next
49140 fori=1to20:nr=i:x=fnvb(0):gosub45000:print#6,hr$;:next
49150 close6:open6,8,6,"hb-"+dn$:mt$="open buchungen":gosub61000
49500 goto49040
53000 rem tastenbelegung
53010 syss9,22,0
53020 ifai$<>"e"then53050
53030 print"f1 weitere eingabe f7 hauptmenue ";
53040 print"f2 eingabe loesch. f8 abbruch ";
53050 ifai$<>"d"then53080
53060 print"f1 weiter f3 zurueck f7 hauptmenue ";
53070 print"f2 aendern f4 loeschen ";
53080 return
53500 rem aenderung
53510 syss9,22,0
53530 print"daten aendern und funktionstaste waehlen";
53540 print"f1,f7 daten uebernehmen f2,f8 abbruch";
53550 return
54000 rem erg.-text
54060 forkk=1toka
54070 :iff$(4)<>kz$(kk)thennext
54100 ifkk<=kathensyssa,fy(4),fx(4)+1,1,"[160]=[160]"kn$(kk)"[146]";
54105 return
54110 forkk=1tova
54120 :iff$(5)<>vz$(kk)thennext
54150 ifkk<=vathensyssa,fy(5),fx(5)+1,1,"[160]=[160]"vn$(kk)"[146]";
54160 return
55000 rem hintergrund
55010 ifai$="e"thenprint"[147]eingabe haushaltsbuch";
55012 ifai$="d"thenprint"[147]durchsicht haushaltsbuch";
55013 ifaj$="6"thenprint"[147]bilanzkorrektur haushaltsbuch";
55015 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
55020 print" datum: ."mid$(dn$,3,2)"."mid$(dn$,1,2)"[146]"
55030 print" text :"
55040 print" wert : dm"
55050 print" konto:"
55060 print" verw.:"
55075 syssa,11,0,1,"[195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195]konten[195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195]";
55076 ifka=0then55110
55080 fori=1to12
55090 :ifi<=kathenprint""kz$(i)"[154]="kn$(i)" ";
55095 :ifi>kathenprint" ";
55100 :nexti
55110 syssa,15,0,1,"[195][195][195][195][195][195][195][195][195][195][195][195][195][195][195]verwendung[195][195][195][195][195][195][195][195][195][195][195][195][195][195][195]";
55112 ifva=0then55150
55119 j1$=" "
55120 fori=1to20
55125 ifi>19thenj1$=""
55130 :ifi<=vathenprint""vz$(i)"[154]="vn$(i)j1$;
55135 :ifi>vathenprint" "j1$;
55140 :nexti
55150 syssa,21,0,1,"[185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]";
55999 return
56000 rem f$ init.
56010 syssf,f$(1),"tt",1,1,2
56020 syssf,f$(2),l$,1,1,31
56030 syssf,f$(3),"-0[160][160][160][160][160][160][160][160][160]",1,1,11
56040 syssf,f$(4),"[160]",1,1,1
56050 syssf,f$(5),"[160]",1,1,1
56052 syssa,fy(4),fx(4)+1,1,"[160][160][160][160][160][160][160][160][160][160]"
56054 syssa,fy(5),fx(5)+1,1,"[160][160][160][160][160][160][160][160][160][160]"
56060 return
56500 rem f$ init.
56510 f$(1)="tt"+""
56520 f$(2)=left$(l$,31)
56530 f$(3)="-0 "+""
56540 f$(4)=" "+""
56550 f$(5)=" "+""
56560 return
57000 rem a$ und b$ => f$
57007 syssf,f$(1),str$(100+asc(b$)-70),1,3,2
57008 syssf,f1$,f$(1),1,1,2
57009 syssf,f1$,dn$,4,3,2
57010 syssf,f1$,dn$,7,1,2
57040 syssf,f$(2),a$,1,12,31
57050 syssf,f$(3),a$,1,1,11
57060 syssf,f$(4),kz$(asc(mid$(b$,2,1))-70),1,1,1
57070 syssf,f$(5),vz$(asc(mid$(b$,3,1))-70),1,1,1
57080 return
58000 rem f$ => a$ und b$
58010 syssf,a$,f$(3),1,1,11
58015 syssf,a$,f$(2),12,1,31
58060 fori=1toka+1
58070 :iff$(4)<>kz$(i)thennext
58090 forii=1tova+1
58100 :iff$(5)<>vz$(ii)thennext
58110 syssf,b$,chr$(val(f$(1))+70),1,1,1
58111 syssf,b$,chr$(i+70),2,1,1
58112 syssf,b$,chr$(ii+70),3,1,1
58120 return
60000 rem open bilanzen
60010 close6
60230 open6,8,6,"hb-bilanzen"
60231 input#3,fm
60232 iffm=62then60500
60233 mt$="open bilanzdatei":gosub61002
60299 return
60500 md$="falsche disk: programmdisk einlegen"
60501 gosub62500
60502 goto60000
61000 input#3,fm
61002 iffm=0orfm=50thenreturn
61010 md$=mt$+": floppy fehler "+str$(fm)+" "
61020 gosub62000
61025 gosub62800:iffp=1thenrun
61026 onfpgoto100,2000,12000
61030 return
62000 rem md$ drucken
62010 syss9,24,0
62020 print" >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<";
62040 h1=int((36-len(md$))/2)+2
62045 syss9,24,h1
62050 print" "md$" [146]";
62060 return
62500 gosub62000
62800 rem wait
62810 poke198,0:wait198,1:poke198,0
62820 return
63000 rem open buchungen
63010 close6
63220 syssf,h7$,"hb-",1,1,3
63221 syssf,h7$,dn$,4,1,4
63230 open6,8,6,h7$
63231 input#3,fm
63232 iffm=62andai$= "e"thengosub63500
63233 iffm=62then63400
63234 gosub61002
63240 ifdn$<>da$thengosub39000:syssf,da$,dn$,1,1,4
63299 return
63400 md$="datei nicht auf disk":gosub62000:close6:return
63500 md$=h7$+" anlegen (j/n) ?"
63501 gosub62000
63502 poke198,0:wait198,1:gethh$:ifhh$<>"j"andhh$<>"n"goto63502
63504 ifhh$="n"then2000
63510 close6
63520 open6,8,6,"0:"+h7$+",l,"+chr$(42)
63530 mt$="disk voll":gosub61000
63535 mt$="anlegen datei":gosub61000
63537 z=173:gosub38000:gosub61000:print#6," 999999.99":gosub61000
63538 forz=0to72:gosub38000:print#6,l$;:next
63539 ar=0:z=0:gosub38000:print#6,"000";
63540 return